package top.codedance.iotp.common.executer;

import cd.io.netty.channel.ChannelHandlerContext;
import top.codedance.iotp.common.entity.CommonEntity;
import top.codedance.iotp.common.entity.PluginResultEntity;
import org.ini4j.Wini;

public interface CommonClientPluginExecuter {
    /**
     * 设置配置对象
     * @return
     */
    void setIniConfig(Wini ini);

    /**
     * 获取配置对象
     * @return
     */
    Wini getIniConfig();

    /**
     * 执行插件
     * @param data
     * @param taskId
     * @return
     */
    PluginResultEntity exec(byte[] data, String taskId);

    /**
     * 执行插件
     * @param channelHandlerContext
     * @param commonEntity
     * @param taskId
     * @return
     */
    void exec(ChannelHandlerContext channelHandlerContext, CommonEntity commonEntity, String taskId);

}
